home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: March 22 1997
- // Author: rs
- //
- // Description:
- // Global function to ensure the options for extrude are set.
- //
- // Input Arguments:
- // Force the factory setting or not.
- //
- // Return Value:
- // None.
- //
-
- global proc extrudeSetOptionVars(
- int $forceFactorySettings )
- //
- //
- //
- {
- // extrudeUseComponentPivot (int) - can be 1|0 for user specified or use
- // start of path.
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeUseComponentPivot`) {
- optionVar -intValue extrudeUseComponentPivot 0;
- }
-
- // only if user specified.
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeUsePivotX`) {
- optionVar -floatValue extrudeUsePivotX 0.0;
- }
-
- if ($forceFactorySettings || !`optionVar -exists extrudeUsePivotY`) {
- optionVar -floatValue extrudeUsePivotY 0.0;
- }
-
- if ($forceFactorySettings || !`optionVar -exists extrudeUsePivotZ`) {
- optionVar -floatValue extrudeUsePivotZ 0.0;
- }
-
- // extrude style is TUBE(2) by default.
- // other options : distance(0), flat(1).
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeStyle`) {
- optionVar -intValue extrudeStyle 2;
- }
-
- // extrude path fixed or shape (1) fixed.
- //
- if ($forceFactorySettings || !`optionVar -exists extrudePathFixed`) {
- optionVar -intValue extrudePathFixed 0;
- }
-
-
- // use profile normal.
- // Only for distance extrude.
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeUseProfileNormal`) {
- optionVar -intValue extrudeUseProfileNormal 1;
- }
-
-
- // extrude direction.
- // X axis (0), Y axis (1), Z axis (2) & user Defined (3).
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeDirectionType`) {
- optionVar -intValue extrudeDirectionType 0;
- }
-
- if ($forceFactorySettings || !`optionVar -exists extrudeDirectionX`) {
- optionVar -floatValue extrudeDirectionX 0.0;
- }
- if ($forceFactorySettings || !`optionVar -exists extrudeDirectionY`) {
- optionVar -floatValue extrudeDirectionY 1.0;
- }
- if ($forceFactorySettings || !`optionVar -exists extrudeDirectionZ`) {
- optionVar -floatValue extrudeDirectionZ 0.0;
- }
-
- // extrude length.
- // only for distance style extrude.
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeLength`) {
- optionVar -floatValue extrudeLength 1.0 ;
- }
-
- // extrude rotation
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeRotation`) {
- optionVar -floatValue extrudeRotation 0.0 ;
- }
-
- // extrude scale.
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeScale`) {
- optionVar -floatValue extrudeScale 1.0 ;
- }
-
- // extrudeCurveRangePartial (int) - either 0|1 for using the complete
- // curve or only a partial curve for the operation.
- //
- if ($forceFactorySettings ||
- !`optionVar -exists extrudeCurveRangePartial`){
- optionVar -intValue extrudeCurveRangePartial 0;
- }
-
- // extrudeOutputPolygons (int) - 0|1 for polygon or Nurbs output
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeOutputPolygons`){
- optionVar -intValue extrudeOutputPolygons 0;
- }
-
- // extrude degree along length.
- // This is only used when a distance extrude is performed
- //
- if ($forceFactorySettings || !`optionVar -exists extrudeDegreeAlongLength`) {
- optionVar -intValue extrudeDegreeAlongLength 3;
- }
- }
-
-